<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>index</title>
    <meta name="decorator" content="default"/>
    <script>
        $(document).ready(function () {

            /*$.ajax({
                url : 'cms/site',
                success : function(data){
                    console.log(data);
                },
                error : function(err){
                    aler(err);
                }
            });*/

            var data = [
                {
                    "name":       "Tiger Nixon",
                    "title":   "System Architect",
                    "description":     "$3,120"
                },
                {
                    "name":       "Garrett Winters",
                    "title":   "Director",
                    "description":     "$5,300"
                }
            ];

            $('#example').DataTable({
                "language": {
                    "lengthMenu": "每页 _MENU_ 条记录",
                    "zeroRecords": "没有找到记录",
                    "info": "第 _PAGE_ 页 ( 总共 _PAGES_ 页 )",
                    "infoEmpty": "无记录",
                    "infoFiltered": "(从 _MAX_ 条记录过滤)"
                },
                "processing": true,
                "ajax": "objects.txt",
                //data: data,
                "columns": [
                    { "data": "name" },
                    { "data": "title" },
                    { "data": "description" }
                ]
            });
        });
    </script>
</head>
<body>
<table id="example" class="display" cellspacing="0" width="100%">
    <thead>
    <tr>
        <th>Name</th>
        <th>Title</th>
        <th>Description</th>
    </tr>
    </thead>

</table>


</body>
</html>
